<#assign  title="订单信息" />
<#include 'common/header.html' />
<link rel="stylesheet" href="${ctx}/themes/default/css/member.css" type="text/css" />
<link rel="stylesheet" href="${ctx}/themes/default/css/button.css" type="text/css" />
<#assign orderDetailTag = newTag("orderDetailTag")>
<!--调用“订单详细”标签，并传递参数-->
<#assign order = orderDetailTag("{'ordersn':'${ordersn!\'\'}'}")>
<!-- 创建“发票标签” -->
<#assign receiptTag = newTag("receiptTag")>
<!-- 调用发票标签 -->
<#assign orderreceipt = receiptTag("{'orderid':${order.order_id}}")>
<div style="margin:0 auto;width:980px" class="visitor_order_detail" id="content_wrapper">
	<div class="left" style="width: 775px; margin-right: 5px;">
		<h3>订单详情：</h3>
		<div class="userL">
			<table class="order_info_goods" width="100%">
				<tr>
					<td width="30%">&nbsp;订单号：${order.sn!''}</td>
					<td width="40%">订单状态：${order.orderStatus}<br/></td>
					<td width="20%" class="btn">
					<#assign  orderStautsTag= newTag("orderStautsTag") />
					<#assign  orderStauts= orderStautsTag() />
					
					<#if !order.isCod && order.pay_status==orderStauts.PAY_NO> 
						<form  action="${ctx}/api/shop/payment.do" target="_blank" >
						<input type="hidden" value="${order.order_id}" name="orderid">
						<input type="submit" class="yellow_btn" value="去付款">
						</form>					
					</#if>		
					</td>
				</tr>
			</table> 
		</div>
        <h4>订单信息：</h4>
		<div class="userL">
			<table class="order_info_table" width="100%">
				<tr><th colspan="2" class="thnone">收货信息：</th></tr>
				<tr>
					<td align="left">
						姓名：${order.ship_name}<br>
						地址：${order.shipping_area}${order.ship_addr}<br>
						电话：${order.ship_mobile}<br>
						邮编：${order.ship_zip!}<br>
					</td>
					<td></td>
				</tr>
				<tr>
					<th colspan="2">支付方式及配送方式：</th>
				</tr>
				<tr>
					<td align="left">
						付款方式：${order.payment_name}<br>
						配送方式：${order.shipping_type}<br>
					</td>
					<td></td>
				</tr>
				<tr>
					<th colspan="2">发票及其他：</th>
				</tr>
				<!--暂时没有-->
				<tr>
						<td>发票抬头:${orderreceipt.title!'无'}<br>
							发票内容:${orderreceipt.content!'无'}<br>
							订单附言:${order.remark!''}<br>
						</td>
						<td></td>
					<td></td>
				</tr>
				<!--暂时没有结束-->
			</table>
		</div>
        <h4>商品清单：</h4>
		<table class="order_info_goods" border="1" bordercolor="#ccc" width="100%" cellpadding="0" cellspacing="0">
			<tr>
				<th>商品编号</th>
				<th>产品名称</th>
				<th>您的价格</th>
				<th>商品数量</th>
				<th>小计</th>
				<th>操作</th>
			</tr>
			<#assign orderItemListTag= newTag("orderItemListTag") >
			<#assign orderItemList = orderItemListTag('{"orderid":${order.order_id}}') >
			<#list orderItemList as item>
			<tr>
				<td align="center">${item.sn}</td>
				<td style="width:380px;padding:0px 5px"><a href="${ctx}/goods-${item.goods_id}.html">${item.name}</a></td>
				<td align="center">${item.price?string("0.0")}</td>
				<td align="center">${item.num}</td>
				<td align="center">${(item.num* item.price)?string("0.0")}</td>
				<td align="center">
					<a href="goods-${item.goods_id}.html">还要买</a>
				</td>
			</tr>
			</#list>
		</table>
		<#assign   orderMetaTag= newTag("orderMetaTag") />
		<#assign   orderMeta = orderMetaTag("{'orderid':${order.order_id}}") />
		<table class="order_info_goods order_info_price" cellpadding="0" cellspacing="0" width="100%">
			<tr>
				<th width="90%" align="right">商品总价：</th>
				<td align="left">￥${order.goods_amount?string("0.0")}</td>
			</tr>
			<tr>
				<th align="right">+运费：</th>
				<td align="left">￥${order.shipping_amount?string("0.0")}</td>
			</tr>
			<tr class="bonus_money_color">
				<th align="right">-积分：</th>
				<td align="left">￥${orderMeta.marketPoint!0?string("0.0")}</td>
			</tr>
			<tr class="bonus_money_color">
				<th align="right">-优惠券：</th>
				<td align="left">￥${orderMeta.bonusdiscount!0?string("0.0")}</td>  
			</tr>
			<tr class="bonus_money_color">
				<th align="right">-使用余额：</th>
				<td align="left">￥${orderMeta.creditpay!0?string("0.0")}</td>
			</tr>
			<tr class="bonus_money_color">
				<th align="right" colspan="2" >
				   <span>应付总额：￥${order.needPayMoney!0?string("0.0")}</span>
				</th>
			</tr>
		</table>
	</div>
	<div class="goods_list_box">
		<div class="commend">
			<h1><span></span>推荐商品</h1>
			<#-- 创建商品列表标签 -->
			<#assign goodsListTag= newTag("goodsListTag") >
			<#-- 调用商品列表 -->
			<#assign goodsList=goodsListTag("'tagid':'3','goodsnum':'10'")> 
			<ul>
				<#list goodsList as goods>
				<li>
					<a href="goods-${goods.goods_id}.html" title="${goods.name}"><@image src="${goods.thumbnail!''}" alt="${goods.name}"/></a>
					<div class="q_intro">
						<div><h2 style="height:40px;line-height:20px;"><@substring title="${goods.name}" length="28" dot="..." /></h2></div>
						<p>售价：<span>${goods.price!''}</span></p>
					</div>
				</li>
				</#list>
			</ul>
		</div>
		<div class="hot">
			<h1><span></span>热卖排行榜</h1>
			<#assign goodsList=goodsListTag("'tagid':'1','goodsnum':'10'")>
			<ul>
				<#list goodsList as goods>
					<li>
						<a href="goods-${goods.goods_id}.html" title="${goods.name}"><@image src="${goods.thumbnail!''}" alt="${goods.name}" /></a>
						<div class="q_intro">
							<div><h2>${goods.name}</h2></div>
							<p>售价：<span>${goods.price!''}</span></p>
						</div>
					</li>
				</#list>
			</ul>
		</div>
		<div class="hot">
			<h1><span></span>最近浏览</h1>
			<#-- 创建浏览历史标签 -->
			<#assign visitedGoodsTag = newTag("visitedGoodsTag") >
			<#-- 获取浏览历史标签 -->
			<#assign visitedGoodsTag = visitedGoodsTag()/>
			<#-- 获取浏览历史商品列表 -->
			<#assign visitedGoodsList = visitedGoodsTag.visitedGoods />
			<ul>
				<#list visitedGoodsList as goods>
					<li class="<#if goods_index==0>first</#if> <#if !goods_has_next>last</#if>">
						<a href="goods-${goods.goods_id}.html"><img alt="${goods.name}" src="${goods.thumbnail!''}"></a>
						<div class="h_intro">
							<div><a href="goods-${goods.goods_id}.html" title="${goods.name}"><@substring title="${goods.name}" length="36" dot="..." /></a></div>
							<p>价格：<span>${goods.price?string.currency}</span></p>
						</div>
					</li>
				</#list>
			</ul>
		</div>
		<div class="gl_adv">
			<#-- 创建广告标签 -->
			<#assign advListTag= newTag("advListTag")>
			<#assign adv2 = advListTag("'acid':'5'")!'' >
			<!-- 获取广告列表 -->
			<#assign advList = adv2.advList />
			<#if !advList?exists || advList?size==0> 
				没有上传广告 
			<#else>
				<#list advList as adv>
					<a href="${adv.url!''}"><@image src="${adv.atturl}"/></a>
				</#list>
			</#if>
			<#assign adv3 = advListTag("'acid':'6'")!'' >
			<!-- 获取广告列表 -->
			<#assign advList = adv3.advList />
			<#if !advList?exists || advList?size==0> 
				没有上传广告 
			<#else>
				<#list advList as adv>
					<a href="${adv.url!''}"><@image src="${adv.atturl}"/></a>
				</#list>
			</#if>
		</div>
	</div>
</div>
<style>
#content_wrapper table th{padding-left:15px;text-align:left;}
#content_wrapper table td{padding-left:20px;text-align:left;}
#content_wrapper table.order_info_price td{text-align:left;padding-left:5px}
#content_wrapper table.order_info_price th{text-align:right;background:none;}
</style>
<#include 'common/footer.html' />